#include "regex.h"

Regex::Regex(string regex) {
	this->regex = regex;
	this->pos = 0;
	this->isEnd = false;
}

Regex::Regex() {} // default constructor

string Regex::getRegex() {
	return regex;
}

char Regex::peek() {
	return regex[pos];
}

char Regex::pop() {
	char peeked = peek();
	
	if (pos < regex.length()-1) pos++;
	else isEnd = true;
	return peeked;
}

bool Regex::reachedEnd() {
	return isEnd;
}